home *** CD-ROM | disk | FTP | other *** search
- ; $VER: BAH! Installer 1.0 (10.5.96)
- ; BAH! - by M&F (Mauro Fontana)
- ; Installer script by Marco Negri & M&F
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (set sourcedir "")
-
- (set dirname "BAH!")
- (set execname "BAH!")
- (set bguidir "libs")
- (set configdir "config")
- (set rexxdir "BED:rexx")
- (set dir2 "rexx/amigaguide")
- (set dir1 "rexx/HTML")
- (set dir3 "rexx/BAH")
-
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (if (= @language "english")
- (
- (set old_os_exit "BAH! required minimum OS version: 37\nYour current version: %ld.%ld\n\nBAH! cannot be installed")
- (set target_prompt "Select location to put BAH! %ld.%ld:\nA directory named %s will be created")
- (set exist_dir_prompt "The directory selected is\n%s\nDo you wish to install BAH! there ?")
- (set same_version_prompt "The same version of BAH! is present\nVersion: %ld.%ld\nDo you want to re-install it ?")
- (set same_version_exit "Same version already present !")
- (set new_version_prompt "A newer version of BAH! is present\nOld version: %ld.%ld\nNew Version: %ld.%ld\nInstallation aborted !")
- (set new_version_exit "Newer version already present !")
- (set old_version_prompt "An older version of BAH! is present\nOld version: %ld.%ld\nNew Version: %ld.%ld\nDo you want to replace it ?")
- (set old_version_exit "Older version not replaced !")
- (set bgui_msg "BAH! requires \"bgui.library\" v??+ to run\n\n(\"bgui.library\" is Copyright (c) Jaba Development and Jan van den Baard)")
- (set config_prompt "Select the config files to install:\n")
-
- (set replace_button "Replace")
- (set abort_button "Abort")
- (set install_there_button "Install BAH! there")
- (set new_dir_button "Create a directory named %s")
- )
- )
-
-
- ; - - - - Check BAH! version and revision - - - -
-
- (complete 0)
-
- (set new_vernum (getversion (tackon sourcedir "BAH!")))
- (set new_ver (shiftright new_vernum 16))
- (set new_rev (BITAND new_vernum 65535))
-
- (set sys_vernum (getversion))
- (set sys_ver (shiftright sys_vernum 16))
- (set sys_rev (BITAND sys_vernum 65535))
-
- ; - - - - Check system version and revision - - - -
-
-
- (set @default-dest "")
-
- (if (< sys_ver 37)
- (exit (old_os_exit sys_ver sys_rev))
- )
-
- ; - - - - Ask for the target directory - - - -
-
- (set target
- (askdir
- (prompt (target_prompt new_ver new_rev dirname))
- (default @default-dest)
- (disk)
- (help @askdir-help)
- )
- )
-
-
- ; - - - - Check if the directory is already called BAH! - - - -
-
-
- (if (= dirname (fileonly target))
- (if (= 1 (askchoice
- (prompt (exist_dir_prompt target))
- (choices install_there_button (new_dir_button dirname))
- (default 0)
- (help @askchoice-help)
- )
- )
-
- (set target (tackon target dirname))
- )
-
- (set target (tackon target dirname))
- )
-
- (set @default-dest target)
-
-
- ; - - - - Check if there is another version present - - - -
-
-
- (set exec (tackon target execname))
-
- (if (exists exec)
- (
- (set old_vernum (getversion exec))
- (set old_ver (/ old_vernum 65536))
- (set old_rev (- old_vernum (* old_ver 65536)))
-
- (if (= old_vernum new_vernum)
- (
- (if (= 0 (askbool
- (prompt (same_version_prompt old_ver old_rev))
- (choices replace_button abort_button)
- (default 0)
- (help @askbool-help)
- )
- )
- (exit same_version_exit)
- )
- )
- (if (< old_vernum new_vernum)
- (if (= 0 (askbool
- (prompt (old_version_prompt old_ver old_rev new_ver new_rev))
- (choices replace_button abort_button)
- (default 1)
- (help @askbool-help)
- )
- )
- (exit old_version_exit)
- )
- (
- (message (new_version_prompt old_ver old_rev new_ver new_rev))
- (exit new_version_exit)
- )
- )
- )
- )
- )
-
- (complete 20)
-
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ; *** BAH! and BAH!.guide ***
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (copyfiles
- (prompt "")
- (source (tackon sourcedir ("/BAH!.info")))
- (dest (pathonly target))
- (help @copyfiles-help)
- )
-
- (copyfiles
- (prompt "")
- (source sourcedir)
- (choices execname ("%s.guide" execname))
- (dest target)
- (infos)
- (help @copyfiles-help)
- )
-
- (complete 40)
-
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ; *** bgui.library ***
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (copylib
- (prompt bgui_msg)
- (help @copylib-help)
- (source (tackon (tackon sourcedir bguidir) "bgui.library"))
- (dest "LIBS:")
- (confirm)
- )
-
- (complete 50)
-
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ; *** Config ***
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (copyfiles
- (prompt "")
- (source (tackon sourcedir ("%s.info" configdir)))
- (dest target)
- (help @copyfiles-help)
- )
-
- (copyfiles
- (prompt config_prompt)
- (source (tackon sourcedir configdir))
- (pattern ".config_#?")
- (dest (tackon target configdir))
- (infos)
- (confirm)
- (help @copyfiles-help)
- )
-
- (complete 60)
-
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ; *** Rexx ***
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (copyfiles
- (prompt "")
- (source (tackon sourcedir ("%s.info" dir3 )))
- (dest rexxdir)
- (help @copyfiles-help)
- )
-
- (copyfiles
- (prompt config_prompt)
- (source (tackon sourcedir dir3))
- (pattern "#?.bed")
- (dest (tackon rexxdir "BAH"))
- (infos)
- (confirm)
- (help @copyfiles-help)
- )
-
- (if (= 0 (askchoice
- (prompt ("\nDo you want to install ARexx Macros\n"))
- (choices "Yes" "No")
- (default 0)
- (help @askbool-help)
- )
- )
-
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ; *** Rexx/HTML ***
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (
- (if
- (= 1
- (askbool
- (prompt ("\nDo you want to install HTML ARexx Macros\n"))
- (choices "Yes" "No")
- (default 1)
- (help @askbool-help)
- )
- )
- (
- (copyfiles
- (prompt "")
- (source (tackon sourcedir ("%s.info" dir1 )))
- (dest rexxdir)
- (help @copyfiles-help)
- )
-
- (copyfiles
- (prompt config_prompt)
- (source (tackon sourcedir dir1))
- (pattern "#?.bed")
- (dest (tackon rexxdir "HTML"))
- (infos)
- (confirm)
- (help @copyfiles-help)
- )
- )
- )
-
- (complete 70)
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ; *** Rexx/AmigaGuide ***
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (if
- (= 1
- (askbool
- (prompt ("\nDo you want to install AmigaGuide ARexx Macros\n"))
- (choices "Yes" "No")
- (default 1)
- (help @askbool-help)
- )
- )
- (
- (copyfiles
- (prompt "")
- (source (tackon sourcedir ("%s.info" dir2 )))
- (dest rexxdir)
- (help @copyfiles-help)
- )
-
- (copyfiles
- (prompt config_prompt)
- (source (tackon sourcedir dir2))
- (pattern "#?.bed")
- (dest (tackon rexxdir "AmigaGuide"))
- (infos)
- (confirm)
- (help @copyfiles-help)
- )
- )
- )
- )
- )
-
- (complete 80)
-
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ; *** BAH! 2.0æ ***
- ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- (if (= 1 (askbool
- (prompt ("\nDo you want to install version 2.0æ\nwith graphics icons incorporated?\n"))
- (choices "Yeeeees!" "No thanks")
- (default 1)
- (help @askbool-help)
- )
- )
-
- (copyfiles
- (prompt "")
- (source sourcedir)
- (choices "BAH!_2.0æ")
- (dest target)
- (infos)
- (help @copyfiles-help)
- )
- )
-
- (complete 100)